package models;

import java.util.List;

import javax.persistence.Entity;
import javax.persistence.Id;

import play.data.validation.Constraints.Required;
import play.db.ebean.Model;

@Entity
public class LegalEntity extends Model {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 8247423018435134107L;
	@Id
	public Long id;
	
	@Required
	public String name;
	
	public LegalEntity(	  Long id  ,String name){
		this.id = id;
		this.name = name;
	}
	

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}	
	
	public static Finder<Long, LegalEntity> find = new Finder<Long, LegalEntity>(Long.class, LegalEntity.class);

	/* Just to make sure */
	public static List<LegalEntity> list() {
		return find.all();
	}
	
	@Override
	public String toString() { 
		return name;
	}

}
